package com.hzy.user;

import com.hzy.configuration.UserConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class UserService {

    @Autowired
    private UserRepository userRepository;

    @Autowired
    private UserConfiguration configuration;

    public User getUserById(String userId) {
        User user = userRepository.findById(userId);
        user.setUser(configuration.getUser());
        log.info("user==============>"+configuration.getUser());
        log.info("girl==============>"+configuration.getGirl());
        return user;
    }
}
